// not even close to finished

namespace Gsl
{
    using System;
    using System.Runtime.InteropServices;
    
    [StructLayout (LayoutKind.Sequential)]
    public struct Complex
    {
        public double Re;
        public double Im;
            
        public Complex(double r, double i)
        {
            this.Re = r;
            this.Im = i;
        }
        
        public static Complex ComplexPolar(double r, double theta)
        {
        	return new Complex(r * Math.Cos(theta), r * Math.Sin(theta));
        }
        
        public override string ToString()
        {
            return String.Format("({0}, {1})", Re, Im);
        }
    }
}
